feat: DNS record management + domain list, with output-field discovery#65
Merged
Conversation
Add `gddy dns` (list/add/set/delete records) and `gddy domain list`, backed by the spec-generated domains-client crate extended with the record + list-domains operations of the same v1 Domains API. domains-client: - Trim spec to include the DNS-record ops (synthesizing the list-all/by-type GETs the published spec omits) and GET /v1/domains; relax read-only response types and strip chrono/uuid formats so the lean dep stack is unchanged. - Derive schemars::JsonSchema on generated types for `--schema` support. gddy: - `gddy dns list|add|set|delete` — case-insensitive --type, repeatable --data, Destructive tier on set/delete; delete rejects NS/SOA (API-managed) with a clear message instead of an opaque conversion error. - `gddy domain list [--status]` — list owned domains. - Register output schemas across env/api/application/domain/dns commands (via a small `output_schema!` macro) so `<cmd> --help` and `--schema` list fields. - Bump cli-engine to 0.3.0 (human output now honors default_fields; --schema reports when no schema is registered). Co-Authored-By: Claude Opus 4.8 <[email protected]>
… schemas
- domain list / dns list: propagate `serde_json::to_value` errors instead of
masking them as `{}`.
- dns add/set/delete: register output schemas so `--help`/`--schema` list their
result fields, consistent with the read commands.
Co-Authored-By: Claude Opus 4.8 <[email protected]>
The single `api list` emitted two different shapes (API domains vs endpoints
with --domain), so its one default_fields projected the endpoint shape to empty
`{}` objects (in JSON pre-existing; the cli-engine 0.3.0 bump extended it to the
human table). Split into two commands, each with a single consistent shape,
default_fields, and output schema:
- `api domain list` -> {domain,title,endpoints,baseUrl}
- `api endpoint list --domain` -> {operationId,method,path,summary}
Co-Authored-By: Claude Opus 4.8 <[email protected]>
The synthesis filtered recordGet's params down to path params, dropping the optional X-Shopper-Id header the record routes support. Keep header params so the list-all / by-type builders expose .x_shopper_id() like recordGet does; regenerated openapi/domains.oas3.json. Co-Authored-By: Claude Opus 4.8 <[email protected]>
jbrooks2-godaddy
left a comment
Collaborator
There was a problem hiding this comment.
Minor suggestions, I do think it's worth fixing the validation issue so that dry-run works correctly
Addresses review (@jbrooks2-godaddy): - Move `--type` validation into clap value-parsers (general + delete-only that rejects NS/SOA) and make `--name` require `--type` via clap, so invalid input fails at parse time — before cli-engine's --dry-run/auth short-circuits. Previously `--dry-run dns delete --type NS` reported success and `dns list --name www` reached auth instead of failing locally. - `dns delete` --type help lists only the deletable types. - Update the godaddy-cli project skill for the `api domain/endpoint list` split. Co-Authored-By: Claude Opus 4.8 <[email protected]>
jbrooks2-godaddy
approved these changes
Jun 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What & why
Adds DNS record management and domain listing to the CLI, plus field discoverability across commands. All backed by the existing spec-generated
domains-clientcrate, extended with the relevant operations of the same v1 Domains API.New commands
gddy dns list|add|set|delete— manage a domain's DNS records.--typeis case-insensitive;--datais repeatable;set/deleteareDestructive(preview with--dry-run).deleterejectsNS/SOA(registry/GoDaddy-managed — not deletable via the records API) with a clear message instead of an opaque conversion error.gddy domain list [--status …]— list the domains in your account.Command restructure
api list→api domain list+api endpoint list --domain …(refined during review). The oldapi listemitted two different shapes (API-domain summaries vs endpoints-by-domain) under a singledefault_fields, which projected the endpoint shape down to empty{}objects (latent in JSON; surfaced in the human table once cli-engine 0.3.0 honorsdefault_fields). Split into two commands, each with one consistent shape,default_fields, and output schema.domains-clientGET /v1/domains.X-Shopper-Idheader so the list-all / by-type builders expose it like the documentedrecordGet(refined during review).requiredfields likecontactRegistrant/renewDeadlineand returnsnameServers: null), and strippeddate-time/uuidformats so the lean reqwest/rustls dependency stack is unchanged.schemars::JsonSchemaon the generated types (pinned to cli-engine's schemars) for--schema.Field discovery
env/api/application/domain/dnsread and mutation commands — including thedns add/set/deleteconfirmation outputs (added during review) — via a smalloutput_schema!macro, so<cmd> --helplists the available fields and--schemaworks. Genuinely passthrough/streaming commands (api call,webhook events,actions describe,application deploy) are intentionally left schema-less.Robustness
domain listanddns listpropagate JSON serialization errors asCliCoreErrorinstead of silently masking them as{}(refined during review).Engine
cli-engineto 0.3.0: human output now honorsdefault_fields(curated tables instead of every column;--fields all/--output jsonfor everything), and--schemareports clearly when a command has no registered schema. The 0.3.0 breaking changes (human views no longer inferred; newCommandSpec/MiddlewareRequestfields) don't affect this crate.Verification
cargo fmt --check,cargo clippy --all-targets -- -D warnings, andcargo test --workspaceall clean (gddy 164, domains-client 9, generate-api-catalog 8). Offlinehttpmocktests cover the record/list client ops (incl. sparsenameServers: nullpayloads); unit tests cover type validation, the NS/SOA delete guard, and list flag rules.🤖 Generated with Claude Code